# https://www.bilibili.com/video/BV1W7411G7wP?p=18&spm_id_from=pageDriver&vd_source=8bd7b24b38e3e12c558d839b352b32f4
import pandas as pd

employees = pd.read_excel('../resources/input_py_tools/018/Employees.xlsx', index_col='ID')
print(employees)

# 中间结果
# str是Series中的一个字段
# https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.str.html
# https://pandas.pydata.org/docs/reference/series.html#api-series-str
employeesFullName = employees['Full Name'].str.split(' ', expand=True) # expand默认位False。默认情况下，分割出来是一个list
print(employeesFullName)

# 加回到employees
employees['First Name'] = employeesFullName[0]
employees['Last Name'] = employeesFullName[1]
print(employees)
